import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;


public class Base {

	protected static final String TEST_RESOURCES_ROOT_FOLDER = "src\\test\\resources\\";
	
	protected static final String SINGLE_ROOT_XML = "<root><root>";
	protected static final String SINGLE_ROOT_XML_v2 = "<root/>";
	
	public static String readFile(String name) throws IOException {
		byte[] encoded = Files.readAllBytes(Paths.get(TEST_RESOURCES_ROOT_FOLDER + name));
		Charset encoding = StandardCharsets.UTF_8;
		return encoding.decode(ByteBuffer.wrap(encoded)).toString();
	}
}
